/*
 * @Author: Eli.Chen
 * @Date: 2025-03-03 15:18:01
 * @LastEditors: Eli.Chen
 * @LastEditTime: 2025-04-30 14:39:04
 * @Description: 权限管理
 */
import axiosRequest from '@/utils/request';

export function login(params) {
    return axiosRequest({
        url: '/auth/doLogin',
        method: 'POST',
        data: params,
    });
}

export function checkUserName(params) {
    return axiosRequest({
        url: '/auth/checkUserName',
        method: 'POST',
        data: params,
    });
}

export function sendCaptcha(params) {
    return axiosRequest({
        url: '/auth/send-code',
        method: 'POST',
        data: params,
    });
}

export function register(params) {
    return axiosRequest({
        url: '/auth/register',
        method: 'POST',
        data: params,
    });
}

export function forgetPassword(params) {
    return axiosRequest({
        url: '/auth/forget-password',
        method: 'POST',
        data: params,
    });
}

export function logout() {
    return axiosRequest({
        url: '/auth/logout',
        method: 'POST',
    });
}

export function getAuthInfo() {
    return axiosRequest({
        url: '/auth/auth',
        method: 'GET',
    });
}

export function validateToken(params) {
    return axiosRequest({
        url: '/auth/validateToken',
        method: 'POST',
        data: params,
    });
}
